<html>
<!--	JoZak (Joze & Izak) Projects  -->
<head>
	<title>Options for the Share on Facebook from Omnibar</title>
	<link rel="stylesheet" type="text/css" media="screen" href="estilo.css" /> 
		
	<script>
	debug =0;
	function setVarValue(varValue) {
		if (document.getElementById(varValue).checked) {
			if (debug == 1) alert("entra checked");
			window.localStorage.setItem(varValue,true);
		} else {
			if (debug == 1) alert("entra not checked");
			window.localStorage.setItem(varValue,false);
		}
	}
	
	function setStateValue(varValue) {
		if (window.localStorage.getItem(varValue) == "true") {
			if (debug == 1) alert("entra true");
			document.getElementById(varValue).checked = 1;
			window.localStorage.setItem(varValue,true);
		} else {
			if (debug == 1) alert("entra false");
			document.getElementById(varValue).checked = 0;
			window.localStorage.setItem(varValue,false);
		}
	}	
	
	function save() {
		if (debug == 1) alert("entra save");
		
		setVarValue('sharehttps');
		setVarValue('urlShorter');		
	}
	
	function state() {
		if (debug == 1) alert("entra state");
		
		setStateValue('sharehttps');
		setStateValue('urlShorter');			
	}
	</script>
	
</head>
<body onLoad=state()>

<!--Codigo con capas en lugar de tablas-->
<div class="contenido">
	<h3>Share on Facebook from Omnibar</h3>

	<div class="logo">
		<img src="images/fb_128.png" title="Share on Facebook from Omnibar extension options" />
	</div>

	<div class="titulo_opciones">Options</div>
	<div class="opciones">
		<input id="sharehttps" type="checkbox" name="sharehttps" value="sharehttps">Don't share https pages<br>
 		<input id="urlShorter" type = "checkbox" name="urlShorter" value="urlShorter">Share page using short URL (bit.ly)
 	<div class="botones">
 		<input type="button" value="Save options" onclick="save()"> 
	</div>
	
</div>

<div class="leyenda">Because Chrome is a minimalist browser, don't put too many extension buttons on it!</div>
</body>
</html>